// 案件中心相关接口

import services from '../createServices';

// 案件核查
export const caseApi = {
  list: params => services.post('/case/list', { params, isLoading: true }),
  type: params => services.post('/case-category/case-category-all', { params, isLoading: true }),
  getEmployees: params => services.post('/case/case-dispatch-user-list', { params, isLoading: true }),
  distributeCase: params => services.post('/case/case-dispatch', { params, isLoading: true }),
  getCaseDetail: params => services.post('/case/case-view', { params, isLoading: true }),
  endCase: params => services.post('/case/case-end', { params, isLoading: true }),
  distributeAddSave: params => services.post('/case/case-trans', { params, isLoading: true }),
  monitorDetail: params => services.post('/case/monitor-detail', { params, isLoading: true }),
};

// 任务中心
export const caseTask = {
  list: params => services.post('/case-task/list', { params, isLoading: true }),
  caseTrace: params => services.post('/case/case-nodes', { params, isLoading: true }),
  upload: params => services.upload('/case-task/chunk-upload', {params, isLoading: true}),
  download: params => services.post('/case-task/get-file-url', {params, isLoading: true}),
  downloadAll: params => services.post('/case-task/batch-download', {params, isLoading: true})
};

// 风险案件
export const caseCategory = {
  list: params => services.post('/case-category/list', { params, isLoading: true }),
  add: params => services.post('/case-category/create', { params, isLoading: true }),
  update: params => services.post('/case-category/edit', { params, isLoading: true }),
  delete: params => services.post('/case-category/delete', { params, isLoading: true }),
  caseCategoryAll: params => services.post('/case-category/case-category-all', { params, isLoading: true })
};

// 风险案件列表
export const caseList = {
  list: params => services.post('/case-category/case-list', { params, isLoading: true })
};
